﻿using System;
using SqlSugar;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Admin.NET.Core;
using System.Collections.Generic;
namespace Admin.NET.Application.Entity
{
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("car_tag","")]
    [Tenant("1300000000001")]
    public class car_tag  : EntityBase
    {
        /// <summary>
        /// 点击次数
        /// </summary>
        [SugarColumn(ColumnDescription = "点击次数")]
        public long? clickCount { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [SugarColumn(ColumnDescription = "标题", Length = 0)]
        public string? title { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [SugarColumn(ColumnDescription = "类型")]
        public int? type { get; set; }
        /// <summary>
        /// 父类id
        /// </summary>
        [Required]
        [SugarColumn(ColumnDescription = "父类id")]
        public long pid { get; set; }


        //用例1：正常一对多
        [Navigate(NavigateType.OneToMany, nameof(car_tagSub.pid))]//BookA表中的studenId
        public List<car_tagSub> subtags { get; set; }//注意禁止给books手动赋值


        //用例1：正常一对多
        [Navigate(NavigateType.OneToOne, nameof(car_tag.pid))]
        public car_tag ptag { get; set; }
    }
}